package cz.cvut.fel.gfupan.gui.execution;

import java.math.BigInteger;
import javax.swing.text.JTextComponent;

public class Meridian implements Executable {

    private JTextComponent declination;

    public Meridian(JTextComponent declination) {
        this.declination = declination;
    }

    @Override
    public String execute() {
        try {
            return new BigInteger(declination.getText()).subtract(BigInteger.valueOf(180)).toString();
        } catch (NumberFormatException e) {
        }

        return "";
    }
}
